Error: Please provide the appropriate client ID
First I have created a firebase project, then I have created two apps(Android and iOS). After the creation of Android I have installed .json file, then after building the apk, from the command "expo fetch:android:hashes", I just got Google Certificate Hash (SHA-256) where I put in the fingerprint in the Google App. With the IOS I have downloaded the .plist file after the creation of the app.
Code:
const config = {
androidClientId:
"//ID from client_id of the google json file",
iosClientId:
"//ID from string of the google plist file",
scopes: ["profile", "email"],
permissions: ["public_profile", "email", "gender", "location"],
};
export const AuthProvider = ({ children }) => {
const signInWithGoogle = async () => {
await Google.logInAsync(config).then(async (loginResults) => {
if (loginResults.type === "success") {
//success
}
});
};
return (
<AuthContext.Provider
value={{
user: null,
signInWithGoogle,
}}
>
{children}
</AuthContext.Provider>
);
};
export default function useAuth() {
return useContext(AuthContext);
}
APP.js
const { signInWithGoogle } = useAuth();
return (
<View>
<Button title="Login" onPress={signInWithGoogle} />
</View>
);
No google modal opens after this just prints out the client id error